package com.hlm.testredis.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @program:test-redis
 * @description:分布mapper
 * @author: xinY
 * @create:2020-07-27 08:37
 **/
@Mapper
@Repository
public interface TestDistributeMapper {
    /**
     * 全部
     * @return
     */
    @Select("SELECT  ctd.v_v05+0\n" +
            "FROM col_terminal_data ctd\n" +
            "JOIN arc_terminal_relevance atr\n" +
            "ON atr.terminal_id = ctd.v_terminal_id\n" +
            "WHERE ctd.v_v05+0<99 AND ctd.v_collect_status = 0\n" +
            "ORDER BY ctd.v_v05\n")
    List<Double> findList4allRoomTemp();

    /**
     * 1013小区的
     * @return
     */
    @Select("SELECT ctd.v_v05+0\n" +
            "FROM col_terminal_data ctd\n" +
            "JOIN arc_terminal_relevance atr\n" +
            "ON atr.terminal_id = ctd.v_terminal_id AND atr.community_id = 1013\n" +
            "WHERE ctd.v_v05+0<99  AND ctd.v_collect_status = 0")
    List<Double> findList4roomTemp();
}
